<h1>Money Receipt</h1>
<p align="right"><a href="<?php echo site_url('accounts/money_receipt/create_mr');?>">Add Receipt</a></p>
<!--<div id="infoMessage"><?php echo $message;?></div>-->

<table class="table table-striped table-bordered" width="100%" id="example">
	<thead>
    <tr>
		<th>Customer Name</th>
		<th>Voucher No</th>
        <th>Date</th>
        <th>Credit Amount</th>
		<th>Payment Type</th>
		<th>Cheque No</th>
		<th>Bank</th>
        <th>Options</th>
	</tr>
    </thead>
	<?php foreach ($payments as $payment):?>
		<tr>
			<td><?php echo $payment->customer_name; ?></td>
			<td><?php  echo $payment->voucher_no; ?></td>
            <td><?php  echo $payment->date; ?></td>
            <td><?php  echo $payment->credit_amount; ?></td>
			 <td><?php  if($payment->payment_type==0){echo "Cash";}else{echo "Cheque/Draft";} ; ?></td>
			  <td><?php if($payment->cheque_no){ echo $payment->cheque_no;}else{echo '---';} ?></td>
			   <td><?php  if($payment->id_bank!=0){echo $this->payment_model->get_bankname($payment->id_bank);}else{echo '---';}; ?></td>
           <td><?php echo anchor("accounts/money_receipt/edit_mr/".$payment->id, 'Edit') ;?>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
               <a href="<?php echo site_url('accounts/money_receipt/delete_mr/').'/'.$payment->id;?>" onclick="return confirm('Are you sure you want to DELETE this purchaser??')">Delete</a>
         </td>
		</tr>
	<?php endforeach;?>
</table>

<!--<p><a href="<?php echo site_url('auth/create_user');?>">Create a new user</a> | <a href="<?php echo site_url('auth/create_group');?>">Create a new group</a>
<a href="<?php echo site_url('auth/logout');?>">Logout</a>
</p>-->


    <!-- Button to trigger modal -->
    
     
    <!-- Modal -->
